filename = 'guest.txt'

with open(filename, 'w') as f_object:
    name = input("请输入你的名字：")
    f_object.write(name)
